package com.wardrobe;

import com.wardrobe.soa.utils.SpringContextUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.scheduling.annotation.EnableScheduling;

import java.util.Arrays;

/**
 * Created by Administrator on 2018/11/14.
 */
@SpringBootApplication
@EnableScheduling
public class WardrobeApplication {
    private static final Logger logger = LoggerFactory.getLogger(WardrobeApplication.class);

    public static void main(String[] args) {
        ConfigurableApplicationContext ctx = SpringApplication.run(WardrobeApplication.class, args);
        SpringContextUtil.setApplicationContext(ctx);
        String[] activeProfiles = ctx.getEnvironment().getActiveProfiles();
        logger.warn("profile :{}", Arrays.toString(activeProfiles));
    }
}
